<?php


/**
 * Base class that represents a query for the 'view_rejections_report' table.
 *
 *
 *
 * @method EmpevalViewRejectionsReportQuery orderByBonusGoalsFormId($order = Criteria::ASC) Order by the bonus_goals_form_id column
 * @method EmpevalViewRejectionsReportQuery orderByFname($order = Criteria::ASC) Order by the fname column
 * @method EmpevalViewRejectionsReportQuery orderByLname($order = Criteria::ASC) Order by the lname column
 * @method EmpevalViewRejectionsReportQuery orderByDepartment($order = Criteria::ASC) Order by the department column
 * @method EmpevalViewRejectionsReportQuery orderByYear($order = Criteria::ASC) Order by the year column
 * @method EmpevalViewRejectionsReportQuery orderByPeriod($order = Criteria::ASC) Order by the period column
 * @method EmpevalViewRejectionsReportQuery orderByPeriodFrom($order = Criteria::ASC) Order by the period_from column
 * @method EmpevalViewRejectionsReportQuery orderByPeriodTo($order = Criteria::ASC) Order by the period_to column
 * @method EmpevalViewRejectionsReportQuery orderByText($order = Criteria::ASC) Order by the text column
 * @method EmpevalViewRejectionsReportQuery orderByDecision($order = Criteria::ASC) Order by the decision column
 * @method EmpevalViewRejectionsReportQuery orderByMeetingDate($order = Criteria::ASC) Order by the meeting_date column
 * @method EmpevalViewRejectionsReportQuery orderByStatus($order = Criteria::ASC) Order by the status column
 *
 * @method EmpevalViewRejectionsReportQuery groupByBonusGoalsFormId() Group by the bonus_goals_form_id column
 * @method EmpevalViewRejectionsReportQuery groupByFname() Group by the fname column
 * @method EmpevalViewRejectionsReportQuery groupByLname() Group by the lname column
 * @method EmpevalViewRejectionsReportQuery groupByDepartment() Group by the department column
 * @method EmpevalViewRejectionsReportQuery groupByYear() Group by the year column
 * @method EmpevalViewRejectionsReportQuery groupByPeriod() Group by the period column
 * @method EmpevalViewRejectionsReportQuery groupByPeriodFrom() Group by the period_from column
 * @method EmpevalViewRejectionsReportQuery groupByPeriodTo() Group by the period_to column
 * @method EmpevalViewRejectionsReportQuery groupByText() Group by the text column
 * @method EmpevalViewRejectionsReportQuery groupByDecision() Group by the decision column
 * @method EmpevalViewRejectionsReportQuery groupByMeetingDate() Group by the meeting_date column
 * @method EmpevalViewRejectionsReportQuery groupByStatus() Group by the status column
 *
 * @method EmpevalViewRejectionsReportQuery leftJoin($relation) Adds a LEFT JOIN clause to the query
 * @method EmpevalViewRejectionsReportQuery rightJoin($relation) Adds a RIGHT JOIN clause to the query
 * @method EmpevalViewRejectionsReportQuery innerJoin($relation) Adds a INNER JOIN clause to the query
 *
 * @method EmpevalViewRejectionsReportQuery leftJoinCommittees($relationAlias = null) Adds a LEFT JOIN clause to the query using the Committees relation
 * @method EmpevalViewRejectionsReportQuery rightJoinCommittees($relationAlias = null) Adds a RIGHT JOIN clause to the query using the Committees relation
 * @method EmpevalViewRejectionsReportQuery innerJoinCommittees($relationAlias = null) Adds a INNER JOIN clause to the query using the Committees relation
 *
 * @method EmpevalViewRejectionsReport findOne(PropelPDO $con = null) Return the first EmpevalViewRejectionsReport matching the query
 * @method EmpevalViewRejectionsReport findOneOrCreate(PropelPDO $con = null) Return the first EmpevalViewRejectionsReport matching the query, or a new EmpevalViewRejectionsReport object populated from the query conditions when no match is found
 *
 * @method EmpevalViewRejectionsReport findOneByBonusGoalsFormId(int $bonus_goals_form_id) Return the first EmpevalViewRejectionsReport filtered by the bonus_goals_form_id column
 * @method EmpevalViewRejectionsReport findOneByFname(string $fname) Return the first EmpevalViewRejectionsReport filtered by the fname column
 * @method EmpevalViewRejectionsReport findOneByLname(string $lname) Return the first EmpevalViewRejectionsReport filtered by the lname column
 * @method EmpevalViewRejectionsReport findOneByDepartment(string $department) Return the first EmpevalViewRejectionsReport filtered by the department column
 * @method EmpevalViewRejectionsReport findOneByYear(int $year) Return the first EmpevalViewRejectionsReport filtered by the year column
 * @method EmpevalViewRejectionsReport findOneByPeriod(string $period) Return the first EmpevalViewRejectionsReport filtered by the period column
 * @method EmpevalViewRejectionsReport findOneByPeriodFrom(string $period_from) Return the first EmpevalViewRejectionsReport filtered by the period_from column
 * @method EmpevalViewRejectionsReport findOneByPeriodTo(string $period_to) Return the first EmpevalViewRejectionsReport filtered by the period_to column
 * @method EmpevalViewRejectionsReport findOneByText(string $text) Return the first EmpevalViewRejectionsReport filtered by the text column
 * @method EmpevalViewRejectionsReport findOneByDecision(string $decision) Return the first EmpevalViewRejectionsReport filtered by the decision column
 * @method EmpevalViewRejectionsReport findOneByMeetingDate(string $meeting_date) Return the first EmpevalViewRejectionsReport filtered by the meeting_date column
 * @method EmpevalViewRejectionsReport findOneByStatus(int $status) Return the first EmpevalViewRejectionsReport filtered by the status column
 *
 * @method array findByBonusGoalsFormId(int $bonus_goals_form_id) Return EmpevalViewRejectionsReport objects filtered by the bonus_goals_form_id column
 * @method array findByFname(string $fname) Return EmpevalViewRejectionsReport objects filtered by the fname column
 * @method array findByLname(string $lname) Return EmpevalViewRejectionsReport objects filtered by the lname column
 * @method array findByDepartment(string $department) Return EmpevalViewRejectionsReport objects filtered by the department column
 * @method array findByYear(int $year) Return EmpevalViewRejectionsReport objects filtered by the year column
 * @method array findByPeriod(string $period) Return EmpevalViewRejectionsReport objects filtered by the period column
 * @method array findByPeriodFrom(string $period_from) Return EmpevalViewRejectionsReport objects filtered by the period_from column
 * @method array findByPeriodTo(string $period_to) Return EmpevalViewRejectionsReport objects filtered by the period_to column
 * @method array findByText(string $text) Return EmpevalViewRejectionsReport objects filtered by the text column
 * @method array findByDecision(string $decision) Return EmpevalViewRejectionsReport objects filtered by the decision column
 * @method array findByMeetingDate(string $meeting_date) Return EmpevalViewRejectionsReport objects filtered by the meeting_date column
 * @method array findByStatus(int $status) Return EmpevalViewRejectionsReport objects filtered by the status column
 *
 * @package    propel.generator.empeval.om
 */
abstract class EmpevalBaseViewRejectionsReportQuery extends ModelCriteria
{
    /**
     * Initializes internal state of EmpevalBaseViewRejectionsReportQuery object.
     *
     * @param     string $dbName The dabase name
     * @param     string $modelName The phpName of a model, e.g. 'Book'
     * @param     string $modelAlias The alias for the model in this query, e.g. 'b'
     */
    public function __construct($dbName = 'vgp_empeval', $modelName = 'EmpevalViewRejectionsReport', $modelAlias = null)
    {
        parent::__construct($dbName, $modelName, $modelAlias);
    }

    /**
     * Returns a new EmpevalViewRejectionsReportQuery object.
     *
     * @param     string $modelAlias The alias of a model in the query
     * @param     EmpevalViewRejectionsReportQuery|Criteria $criteria Optional Criteria to build the query from
     *
     * @return EmpevalViewRejectionsReportQuery
     */
    public static function create($modelAlias = null, $criteria = null)
    {
        if ($criteria instanceof EmpevalViewRejectionsReportQuery) {
            return $criteria;
        }
        $query = new EmpevalViewRejectionsReportQuery();
        if (null !== $modelAlias) {
            $query->setModelAlias($modelAlias);
        }
        if ($criteria instanceof Criteria) {
            $query->mergeWith($criteria);
        }

        return $query;
    }

    /**
     * Find object by primary key.
     * Propel uses the instance pool to skip the database if the object exists.
     * Go fast if the query is untouched.
     *
     * <code>
     * $obj  = $c->findPk(12, $con);
     * </code>
     *
     * @param mixed $key Primary key to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return   EmpevalViewRejectionsReport|EmpevalViewRejectionsReport[]|mixed the result, formatted by the current formatter
     */
    public function findPk($key, $con = null)
    {
        if ($key === null) {
            return null;
        }
        if ((null !== ($obj = EmpevalViewRejectionsReportPeer::getInstanceFromPool((string) $key))) && !$this->formatter) {
            // the object is alredy in the instance pool
            return $obj;
        }
        if ($con === null) {
            $con = Propel::getConnection(EmpevalViewRejectionsReportPeer::DATABASE_NAME, Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        if ($this->formatter || $this->modelAlias || $this->with || $this->select
         || $this->selectColumns || $this->asColumns || $this->selectModifiers
         || $this->map || $this->having || $this->joins) {
            return $this->findPkComplex($key, $con);
        } else {
            return $this->findPkSimple($key, $con);
        }
    }

    /**
     * Find object by primary key using raw SQL to go fast.
     * Bypass doSelect() and the object formatter by using generated code.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return   EmpevalViewRejectionsReport A model object, or null if the key is not found
     * @throws   PropelException
     */
    protected function findPkSimple($key, $con)
    {
        $sql = 'SELECT BONUS_GOALS_FORM_ID, FNAME, LNAME, DEPARTMENT, YEAR, PERIOD, PERIOD_FROM, PERIOD_TO, TEXT, DECISION, MEETING_DATE, STATUS FROM view_rejections_report WHERE BONUS_GOALS_FORM_ID = :p0';
        try {
            $stmt = $con->prepare($sql);
            $stmt->bindValue(':p0', $key, PDO::PARAM_INT);
            $stmt->execute();
        } catch (Exception $e) {
            Propel::log($e->getMessage(), Propel::LOG_ERR);
            throw new PropelException(sprintf('Unable to execute SELECT statement [%s]', $sql), $e);
        }
        $obj = null;
        if ($row = $stmt->fetch(PDO::FETCH_NUM)) {
            $obj = new EmpevalViewRejectionsReport();
            $obj->hydrate($row);
            EmpevalViewRejectionsReportPeer::addInstanceToPool($obj, (string) $key);
        }
        $stmt->closeCursor();

        return $obj;
    }

    /**
     * Find object by primary key.
     *
     * @param     mixed $key Primary key to use for the query
     * @param     PropelPDO $con A connection object
     *
     * @return EmpevalViewRejectionsReport|EmpevalViewRejectionsReport[]|mixed the result, formatted by the current formatter
     */
    protected function findPkComplex($key, $con)
    {
        // As the query uses a PK condition, no limit(1) is necessary.
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKey($key)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->formatOne($stmt);
    }

    /**
     * Find objects by primary key
     * <code>
     * $objs = $c->findPks(array(12, 56, 832), $con);
     * </code>
     * @param     array $keys Primary keys to use for the query
     * @param     PropelPDO $con an optional connection object
     *
     * @return PropelObjectCollection|EmpevalViewRejectionsReport[]|mixed the list of results, formatted by the current formatter
     */
    public function findPks($keys, $con = null)
    {
        if ($con === null) {
            $con = Propel::getConnection($this->getDbName(), Propel::CONNECTION_READ);
        }
        $this->basePreSelect($con);
        $criteria = $this->isKeepQuery() ? clone $this : $this;
        $stmt = $criteria
            ->filterByPrimaryKeys($keys)
            ->doSelect($con);

        return $criteria->getFormatter()->init($criteria)->format($stmt);
    }

    /**
     * Filter the query by primary key
     *
     * @param     mixed $key Primary key to use for the query
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByPrimaryKey($key)
    {

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::BONUS_GOALS_FORM_ID, $key, Criteria::EQUAL);
    }

    /**
     * Filter the query by a list of primary keys
     *
     * @param     array $keys The list of primary key to use for the query
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByPrimaryKeys($keys)
    {

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::BONUS_GOALS_FORM_ID, $keys, Criteria::IN);
    }

    /**
     * Filter the query on the bonus_goals_form_id column
     *
     * Example usage:
     * <code>
     * $query->filterByBonusGoalsFormId(1234); // WHERE bonus_goals_form_id = 1234
     * $query->filterByBonusGoalsFormId(array(12, 34)); // WHERE bonus_goals_form_id IN (12, 34)
     * $query->filterByBonusGoalsFormId(array('min' => 12)); // WHERE bonus_goals_form_id > 12
     * </code>
     *
     * @param     mixed $bonusGoalsFormId The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByBonusGoalsFormId($bonusGoalsFormId = null, $comparison = null)
    {
        if (is_array($bonusGoalsFormId) && null === $comparison) {
            $comparison = Criteria::IN;
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::BONUS_GOALS_FORM_ID, $bonusGoalsFormId, $comparison);
    }

    /**
     * Filter the query on the fname column
     *
     * Example usage:
     * <code>
     * $query->filterByFname('fooValue');   // WHERE fname = 'fooValue'
     * $query->filterByFname('%fooValue%'); // WHERE fname LIKE '%fooValue%'
     * </code>
     *
     * @param     string $fname The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByFname($fname = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($fname)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $fname)) {
                $fname = str_replace('*', '%', $fname);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::FNAME, $fname, $comparison);
    }

    /**
     * Filter the query on the lname column
     *
     * Example usage:
     * <code>
     * $query->filterByLname('fooValue');   // WHERE lname = 'fooValue'
     * $query->filterByLname('%fooValue%'); // WHERE lname LIKE '%fooValue%'
     * </code>
     *
     * @param     string $lname The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByLname($lname = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($lname)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $lname)) {
                $lname = str_replace('*', '%', $lname);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::LNAME, $lname, $comparison);
    }

    /**
     * Filter the query on the department column
     *
     * Example usage:
     * <code>
     * $query->filterByDepartment('fooValue');   // WHERE department = 'fooValue'
     * $query->filterByDepartment('%fooValue%'); // WHERE department LIKE '%fooValue%'
     * </code>
     *
     * @param     string $department The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByDepartment($department = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($department)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $department)) {
                $department = str_replace('*', '%', $department);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::DEPARTMENT, $department, $comparison);
    }

    /**
     * Filter the query on the year column
     *
     * Example usage:
     * <code>
     * $query->filterByYear(1234); // WHERE year = 1234
     * $query->filterByYear(array(12, 34)); // WHERE year IN (12, 34)
     * $query->filterByYear(array('min' => 12)); // WHERE year > 12
     * </code>
     *
     * @param     mixed $year The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByYear($year = null, $comparison = null)
    {
        if (is_array($year)) {
            $useMinMax = false;
            if (isset($year['min'])) {
                $this->addUsingAlias(EmpevalViewRejectionsReportPeer::YEAR, $year['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($year['max'])) {
                $this->addUsingAlias(EmpevalViewRejectionsReportPeer::YEAR, $year['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::YEAR, $year, $comparison);
    }

    /**
     * Filter the query on the period column
     *
     * Example usage:
     * <code>
     * $query->filterByPeriod('fooValue');   // WHERE period = 'fooValue'
     * $query->filterByPeriod('%fooValue%'); // WHERE period LIKE '%fooValue%'
     * </code>
     *
     * @param     string $period The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByPeriod($period = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($period)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $period)) {
                $period = str_replace('*', '%', $period);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::PERIOD, $period, $comparison);
    }

    /**
     * Filter the query on the period_from column
     *
     * Example usage:
     * <code>
     * $query->filterByPeriodFrom('fooValue');   // WHERE period_from = 'fooValue'
     * $query->filterByPeriodFrom('%fooValue%'); // WHERE period_from LIKE '%fooValue%'
     * </code>
     *
     * @param     string $periodFrom The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByPeriodFrom($periodFrom = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($periodFrom)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $periodFrom)) {
                $periodFrom = str_replace('*', '%', $periodFrom);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::PERIOD_FROM, $periodFrom, $comparison);
    }

    /**
     * Filter the query on the period_to column
     *
     * Example usage:
     * <code>
     * $query->filterByPeriodTo('fooValue');   // WHERE period_to = 'fooValue'
     * $query->filterByPeriodTo('%fooValue%'); // WHERE period_to LIKE '%fooValue%'
     * </code>
     *
     * @param     string $periodTo The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByPeriodTo($periodTo = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($periodTo)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $periodTo)) {
                $periodTo = str_replace('*', '%', $periodTo);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::PERIOD_TO, $periodTo, $comparison);
    }

    /**
     * Filter the query on the text column
     *
     * Example usage:
     * <code>
     * $query->filterByText('fooValue');   // WHERE text = 'fooValue'
     * $query->filterByText('%fooValue%'); // WHERE text LIKE '%fooValue%'
     * </code>
     *
     * @param     string $text The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByText($text = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($text)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $text)) {
                $text = str_replace('*', '%', $text);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::TEXT, $text, $comparison);
    }

    /**
     * Filter the query on the decision column
     *
     * Example usage:
     * <code>
     * $query->filterByDecision('fooValue');   // WHERE decision = 'fooValue'
     * $query->filterByDecision('%fooValue%'); // WHERE decision LIKE '%fooValue%'
     * </code>
     *
     * @param     string $decision The value to use as filter.
     *              Accepts wildcards (* and % trigger a LIKE)
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByDecision($decision = null, $comparison = null)
    {
        if (null === $comparison) {
            if (is_array($decision)) {
                $comparison = Criteria::IN;
            } elseif (preg_match('/[\%\*]/', $decision)) {
                $decision = str_replace('*', '%', $decision);
                $comparison = Criteria::LIKE;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::DECISION, $decision, $comparison);
    }

    /**
     * Filter the query on the meeting_date column
     *
     * Example usage:
     * <code>
     * $query->filterByMeetingDate('2011-03-14'); // WHERE meeting_date = '2011-03-14'
     * $query->filterByMeetingDate('now'); // WHERE meeting_date = '2011-03-14'
     * $query->filterByMeetingDate(array('max' => 'yesterday')); // WHERE meeting_date > '2011-03-13'
     * </code>
     *
     * @param     mixed $meetingDate The value to use as filter.
     *              Values can be integers (unix timestamps), DateTime objects, or strings.
     *              Empty strings are treated as NULL.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByMeetingDate($meetingDate = null, $comparison = null)
    {
        if (is_array($meetingDate)) {
            $useMinMax = false;
            if (isset($meetingDate['min'])) {
                $this->addUsingAlias(EmpevalViewRejectionsReportPeer::MEETING_DATE, $meetingDate['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($meetingDate['max'])) {
                $this->addUsingAlias(EmpevalViewRejectionsReportPeer::MEETING_DATE, $meetingDate['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::MEETING_DATE, $meetingDate, $comparison);
    }

    /**
     * Filter the query on the status column
     *
     * Example usage:
     * <code>
     * $query->filterByStatus(1234); // WHERE status = 1234
     * $query->filterByStatus(array(12, 34)); // WHERE status IN (12, 34)
     * $query->filterByStatus(array('min' => 12)); // WHERE status > 12
     * </code>
     *
     * @param     mixed $status The value to use as filter.
     *              Use scalar values for equality.
     *              Use array values for in_array() equivalent.
     *              Use associative array('min' => $minValue, 'max' => $maxValue) for intervals.
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function filterByStatus($status = null, $comparison = null)
    {
        if (is_array($status)) {
            $useMinMax = false;
            if (isset($status['min'])) {
                $this->addUsingAlias(EmpevalViewRejectionsReportPeer::STATUS, $status['min'], Criteria::GREATER_EQUAL);
                $useMinMax = true;
            }
            if (isset($status['max'])) {
                $this->addUsingAlias(EmpevalViewRejectionsReportPeer::STATUS, $status['max'], Criteria::LESS_EQUAL);
                $useMinMax = true;
            }
            if ($useMinMax) {
                return $this;
            }
            if (null === $comparison) {
                $comparison = Criteria::IN;
            }
        }

        return $this->addUsingAlias(EmpevalViewRejectionsReportPeer::STATUS, $status, $comparison);
    }

    /**
     * Filter the query by a related EmpevalCommittees object
     *
     * @param   EmpevalCommittees|PropelObjectCollection $committees  the related object to use as filter
     * @param     string $comparison Operator to use for the column comparison, defaults to Criteria::EQUAL
     *
     * @return   EmpevalViewRejectionsReportQuery The current query, for fluid interface
     * @throws   PropelException - if the provided filter is invalid.
     */
    public function filterByCommittees($committees, $comparison = null)
    {
        if ($committees instanceof EmpevalCommittees) {
            return $this
                ->addUsingAlias(EmpevalViewRejectionsReportPeer::BONUS_GOALS_FORM_ID, $committees->getBonusGoalsFormId(), $comparison);
        } elseif ($committees instanceof PropelObjectCollection) {
            return $this
                ->useCommitteesQuery()
                ->filterByPrimaryKeys($committees->getPrimaryKeys())
                ->endUse();
        } else {
            throw new PropelException('filterByCommittees() only accepts arguments of type EmpevalCommittees or PropelCollection');
        }
    }

    /**
     * Adds a JOIN clause to the query using the Committees relation
     *
     * @param     string $relationAlias optional alias for the relation
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function joinCommittees($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        $tableMap = $this->getTableMap();
        $relationMap = $tableMap->getRelation('Committees');

        // create a ModelJoin object for this join
        $join = new ModelJoin();
        $join->setJoinType($joinType);
        $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
        if ($previousJoin = $this->getPreviousJoin()) {
            $join->setPreviousJoin($previousJoin);
        }

        // add the ModelJoin to the current object
        if ($relationAlias) {
            $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());
            $this->addJoinObject($join, $relationAlias);
        } else {
            $this->addJoinObject($join, 'Committees');
        }

        return $this;
    }

    /**
     * Use the Committees relation Committees object
     *
     * @see       useQuery()
     *
     * @param     string $relationAlias optional alias for the relation,
     *                                   to be used as main alias in the secondary query
     * @param     string $joinType Accepted values are null, 'left join', 'right join', 'inner join'
     *
     * @return   EmpevalCommitteesQuery A secondary query class using the current class as primary query
     */
    public function useCommitteesQuery($relationAlias = null, $joinType = Criteria::INNER_JOIN)
    {
        return $this
            ->joinCommittees($relationAlias, $joinType)
            ->useQuery($relationAlias ? $relationAlias : 'Committees', 'EmpevalCommitteesQuery');
    }

    /**
     * Exclude object from result
     *
     * @param   EmpevalViewRejectionsReport $viewRejectionsReport Object to remove from the list of results
     *
     * @return EmpevalViewRejectionsReportQuery The current query, for fluid interface
     */
    public function prune($viewRejectionsReport = null)
    {
        if ($viewRejectionsReport) {
            $this->addUsingAlias(EmpevalViewRejectionsReportPeer::BONUS_GOALS_FORM_ID, $viewRejectionsReport->getBonusGoalsFormId(), Criteria::NOT_EQUAL);
        }

        return $this;
    }

}
